"use strict";
const { packageName } = require("./package");
const path = require("path");
function resolve(dir) {
  return path.join(__dirname, dir);
}
module.exports = {
  devServer: {
    host: "0.0.0.0",
    port: 8081,
    open: true,
    headers: {
      "Access-Control-Allow-Origin": "*",
    },
  }, // 自定义webpack配置
  configureWebpack: {
    resolve: {
      alias: {
        "@": resolve("src"),
      },
    },
    output: {
      // 把子应用打包成 umd 库格式
      library: "vueSub", //与主应用配置的一致
      libraryTarget: "umd",
      jsonpFunction: `webpackJsonp_${packageName}`,
    },
  },
};
